<div class="panel" ng-controller="insertarTexto">
    <div class="panel-body col-sm-offset-1">
        <div class="panel-heading"><strong>Texto Completo</strong></div><a ng-show="checked" href="" ng-click="checked = false">Ver</a>
            <div class="col-md-12" ng-hide="checked">
                <a ng-hide="checked" href="" ng-click="checked = true">Ocultar</a>
                <p>{{etiquetas.texto}}</p>
            </div>
        <div class="divider divider-ls pull-in"></div>
        <div class="panel-heading"><strong>Variables</strong></div>
        <div style="height: 300px; overflow-y: scroll;">     
        <table class="table table-striped table-responsive">
                <tbody>
                    <tr ng-repeat="variable in etiquetas">
                        <td class="row">
                            <div>
                                <p>{{variable.variable}}</p>
                            </div>
                            <div ng-hide=otro>
                                <span class="ui-select">
                                    <select ng-model= valor ng-options="valor.valor for valor in variable.valores" ng-click=setValores(valor.idValor)>
                                        <option >{{valor.valor}}</option>
                                    </select>
                                </span>
                            </div>
                            <div>
                                <a href="" class="btn" ng-click="otro = true" ng-hide=otro><span class="glyphicon glyphicon-plus"></span></a>
                            </div>
                            <div ng-show=otro>
                                <div class="col-md-4">
                                    <input type="text" class="form-control" ng-model="nuevoVal">
                                    <a href="" class="btn" ng-click="otro = false"><span class="glyphicon glyphicon glyphicon-minus"></span></a>
                                </div>
                                <a href="" class="btn" ng-click=nuevoValor(variable.id,nuevoVal)><span class="glyphicon glyphicon-ok"></span></a>
                            </div>
                        </td>
                    </tr>
                </tbody>
            </table>
            </div>
        <div class="divider divider-ls pull-in"></div>        
        <div class="divider divider-ls pull-in"></div>
        <form class="form-group form-horizontal">
            <div class="panel-heading"><strong>observación</strong></div>
            <div class="row">
                <textarea class="form-control" ng-model="observacion"></textarea>                
            </div>
        </form>
    </div>
    <div class="row form-group form-inline panel-body col-md-offset-5">
              <button type="button" class="btn btn-default btn-w-lg" ng-click=asignarValores()><i class="glyphicon glyphicon-ok" ></i> Asignar</button>
              <button type="button" class="btn btn-default btn-w-lg" ng-click=volverTriage()><i class="glyphicon glyphicon-share-alt"></i> Cancelar y Volver</button>
        </div>
</div>